package com.gable.exhibition.dao;

import com.gable.exhibition.model.Maintainer;
import com.gable.exhibition.model.ManufacturerMaintainer;
import com.gable.exhibition.view.ManufacturerMaintainerView;

import java.util.List;

public interface ManufacturerMaintainerDao {
    int deleteByPrimaryKey(Long manufacturerMaintainerId);

    int insert(ManufacturerMaintainer record);

    int insertSelective(ManufacturerMaintainer record);

    ManufacturerMaintainer selectByPrimaryKey(Long manufacturerMaintainerId);

    int updateByPrimaryKeySelective(ManufacturerMaintainer record);

    int updateByPrimaryKey(ManufacturerMaintainer record);

    //根据厂商ID获取旗下所有的维修商列表,供下拉框使用
    List<ManufacturerMaintainerView> getListByManufacturerId(Long ManufacturerId);

    /**
     * 删除厂商和维修商之间的关系
     * @param manufacturerId
     * @Create user jacky
     * @Create date 2018/2/28
     * @return
     */
    int deleteBaseByManufacturerId(Long manufacturerId);

    /**
     * 初始化加载所有厂商和维修商之间的关系
     * @Create user jacky
     * @Create date 2018/3/3
     * @return
     */
    List<ManufacturerMaintainerView> manufacturerMaintainerInit();

    List<ManufacturerMaintainerView> maintainerManufacturerInit();

    List<Maintainer> queryMinListByMamuId(Long manufacturerId);
}